#include<bits/stdc++.h>
#define y1 Y1
#define fi first
#define endl "\n"
#define se second
#define PI acos(-1)
#define int long long
#define pb(x) push_back(x)
#define PII pair<int, int>
#define Yes cout << "Yes\n";
#define No cout << "No\n";
#define YES cout << "YES\n";
#define NO cout << "NO\n";
#define _for(i, a, b) for(int i = a; i <= b; ++i)
#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using namespace std;

const int N = 100;
const int mod = 1e9 + 7;

char a[N][N];
int n, m, t, ret, p;
string s;
int dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
bool st[N][N];

bool check(int x, int y) {
	return x >= 1 && x <= n && y >= 1 && y <= m && a[x][y] == '.' && st[x][y] == false; 
}

void dfs(int x, int y) {
	ret ++ ;
	p = max(ret, p);
	st[x][y] = true;
	for(int i = 0; i < 4; ++ i ) {
		int dx = x + dir[i][0];
		int dy = y + dir[i][1];
		if(check(dx, dy)) {
			dfs(dx, dy);
			ret -- ;
			st[dx][dy] = false;
		}
	}
}

signed main() {
	IOS;
	int x, y;
	cin >> n >> m >> x >> y;
	
	for(int i = 1; i <= n; ++ i ) {
		for(int j = 1; j <= m; ++ j ) {
			cin >> a[i][j];
			if(a[i][j] == '#')ret ++ ;
		}
	}
	dfs(x, y);
//	cout << "p = " << p << endl;
	cout << (p == n * m ? "YES" : "NO") << endl;
	return 0;
}
/*
4 4 2 1
#..#
....
.##.
...#
*/

